#include <iostream>
#include <string>
using namespace std;

int main()
{
	string str; 
	cin >> str;
	cout << str.size();
	
	while (cin >> str)
	{
		cout << "," << str.size();
	}
	
	return 0;
}
